Replication files for Unpacking the Role of In-Group Bias in US Public Opinion on Human Rights Violations

Author: Rebecca Cordell

Replication instructions: Run "cordell_ingroupbiashumanrights_manuscript.R"

All analyses were conducted using the following computing environment and statistical software:

Apple MacBook M3 Pro, MacOS Sonoma Version 14.4, 18 GB Ram

R version 4.4.1 (2024-06-14)

R studio Version 2024.04.2+764

Duration of time to process the job in R studio: 2.13 minutes

Required R packages/libraries: 

dplyr 1.1.4
ggplot2 3.5.1
forcats 1.0.0
ggpubr 0.6.0
cregg 0.4.0
ggeasy 0.1.4
lemon 0.4.9
sandwich 3.1-1
survey 4.4-2
lmtest 0.9-40
remotes 2.5.0
cjpowR 1.0.2
nnet 7.3-19
stargazer 5.2.3
cjoint 2.1.1

Data source: YouGov human rights survey, 3200 online interviews, fielded June 14, 2021 - June 28, 2021

Data source citation: Cordell, Rebecca. 2025. Data from: Unpacking the Role of In-Group Bias in US Public Opinion on Human Rights Violations. American Journal of Political Science Dataverse. https://doi.org/10.7910/DVN/TGAL7M 

REPLICATION FILE CONTENTS

[Manuscript]

1. cordell_ingroupbiashumanrights_codebook.pdf = Names, descriptions, and summary statistics of variables in the dataset.

2. cordell_ingroupbiashumanrights_manuscript.R = R code used to produce all results, tables, and figures in the manuscript.

3. cordell_ingroupbiashumanrights_manuscript.log = Log file capturing all R console output for in-text results in the manuscript.

4. cordell_ingroupbiashumanrights_manuscript_rmarkdown.pdf = R markdown-generated document containing all R code, output, and figures in the manuscript.

5. cordell_ingroupbiashumanrights_data.csv = 32,000 observations representing 3,200 respondents, with each participant assessing 2 conjoint human rights violation profiles per task and repeating this task 5 times.

[SI Online Appendix]

6. cordell_ingroupbiashumanrights_si_appendix_a.R = R code used to produce all results, tables, and figures in SI Appendix A.
7. cordell_ingroupbiashumanrights_si_appendix_b.R = R code used to produce all results, tables, and figures in SI Appendix B.
8. cordell_ingroupbiashumanrights_si_appendix_d.R = R code used to produce all results, tables, and figures in SI Appendix D.
9. cordell_ingroupbiashumanrights_si_appendix_e.R = R code used to produce all results, tables, and figures in SI Appendix E.
10. cordell_ingroupbiashumanrights_si_appendix_f.R = R code used to produce all results, tables, and figures in SI Appendix F.
11. cordell_ingroupbiashumanrights_si_appendix_g1.R = R code used to produce all results, tables, and figures in SI Appendix G.1.
12. cordell_ingroupbiashumanrights_si_appendix_g2.R = R code used to produce all results, tables, and figures in SI Appendix G.2.
13. cordell_ingroupbiashumanrights_si_appendix_g3.R = R code used to produce all results, tables, and figures in SI Appendix G.3.
14. cordell_ingroupbiashumanrights_si_appendix_g4.R = R code used to produce all results, tables, and figures in SI Appendix G.4.
15. cordell_ingroupbiashumanrights_si_appendix_g5.R = R code used to produce all results, tables, and figures in SI Appendix G.5.
16. cordell_ingroupbiashumanrights_si_appendix_h.R = R code used to produce all results, tables, and figures in SI Appendix H.
17. cordell_ingroupbiashumanrights_si_appendix_i.R = R code used to produce all results, tables, and figures in SI Appendix I.
18. cordell_ingroupbiashumanrights_si_appendix_j.R = R code used to produce all results, tables, and figures in SI Appendix J.
19. cordell_ingroupbiashumanrights_si_appendix_k.R = R code used to produce all results, tables, and figures in SI Appendix K.
20. cordell_ingroupbiashumanrights_si_appendix_l.R = R code used to produce all results, tables, and figures in SI Appendix L.
21. cordell_ingroupbiashumanrights_si_appendix_m.R = R code used to produce all results, tables, and figures in SI Appendix M.22. cordell_ingroupbiashumanrights_si_appendix_n.R = R code used to produce all results, tables, and figures in SI Appendix N.